package cn.liumouren.jzxd.service.impl;

import cn.liumouren.jzxd.dao.MerchantApplyDao;
import cn.liumouren.jzxd.entity.MerchantApply;
import cn.liumouren.jzxd.service.MerchantApplyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;

/**
 * (MerchantApply)表服务实现类
 *
 * @author makejava
 * @since 2021-01-23 12:52:44
 */
@Service("merchantApplyService")
public class MerchantApplyServiceImpl extends ServiceImpl<MerchantApplyDao, MerchantApply> implements MerchantApplyService {
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean save(MerchantApply merchantApply) {
        merchantApply.setApplyTime(new Date());
        merchantApply.setState(0);
        return super.save(merchantApply);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean updateById(MerchantApply merchantApply) {
        return super.updateById(merchantApply);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean removeByIds(Collection<? extends Serializable> idList) {
        return super.removeByIds(idList);
    }
}